import javax.swing.JFrame;


/**
 * UI class 
 *
 */
public class ImageViewer extends JFrame {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static final int WINDOW_HEIGHT = 400;
	public static final int WINDOW_WIDTH = 400;
	
	private int[][] _matrix;
	private String _name;
	
	public ImageViewer(int[][] matrix, String name) {
		super();
		_matrix = matrix;
		_name = name;
		build();
	}
	
	private void build() {
		setTitle(_name); 
		setSize(WINDOW_WIDTH,WINDOW_HEIGHT); 
		setLocationRelativeTo(null); 
		setResizable(false); 
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		ImageViewerPanel panel = new ImageViewerPanel(_matrix);
		getContentPane().add(panel);
		pack();
		repaint();
	}
	
	
	
}
